<template>
	<view class="pages-home" v-if="isLoad">
		
		<image class="top-bg" mode="heightFix" src="../static/main/main_bg.jpg"></image>
		<view >
			<image class="bg-image" mode="aspectFill" src="../static/main/main_top_bg.jpg"></image>
			
			<MyNav :title="userInfo.user_nicename" :showTitle="true" titleColor="#dc7428" bgColor="" :backIcon="false"></MyNav>
			
			<view class="top">
				<!-- <view class="searchbox" style="background-color: #fff;">
					<image style=" margin-left: 30px;width: 30rpx;height: 30rpx;display: inline-block;position: relative;top:-5px; " src="https://lbqny.migugu.com/admin/public/search.png" mode=""></image>
					<input style="display: inline-block;margin-left: 10px;" type="text" placeholder="输入搜索关键词" v-model="searchwords" />
					
				</view> -->
				<view class="flex-1" style="margin-left: 18rpx;display: flex;
			justify-content: space-between;background-color: rgba(255, 255, 255, 0.2);;border-radius: 10rpx;">
					<!-- <search class="search" type="input"  v-model="searchwords" :padding="0" :radius="50" 
						placeholder="搜索" style="padding-left: 45px;display: inline-block;width:150px;"> 
					</search> -->
					<image style=" margin-left: 30px;width: 30rpx;height: 30rpx;display: inline-block;position: relative;top:16rpx;left:180rpx; " src="https://lbqny.migugu.com/admin/public/search.png" mode=""></image>
					<input style="display: inline-block;margin-left: 10px;" type="text" class="search" placeholder="输入搜索关键词" v-model="searchwords" confirm-type="search" @confirm="onSearch"/>
				</view>
				<image style="" class="image" @tap.stop="toQrcode" src="http://xcx.bbi-love.com/static/scan.png"></image>
			</view>
			
			<!-- <view >
				<banner  :list="banner" :height="300" :margin="0" :autoplay="true" :indicatorActiveColor="primaryColor" :dotWidth="20"
					:dotBottom="30" v-if="banner.length > 0">
				</banner>
			</view> -->
			
		</view>
		<view class="container">		
					<scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll" scroll-left="120">
						<!-- <view style="display: inline-block;margin-left:50rpx;">
							<image src="../static/tuijian.png" style="width: 120rpx;height:50rpx;"></image></view> -->
					<view  class="scroll-view-item_H uni-bg-red" @click="goclassdetail(item.gc_id)"  v-for="(item, index) in classList">{{ item.gc_name }}</view>
					</scroll-view>
		</view>
		<view :class="[{'rel':banner.length >0}]" :style="{height:banner.length > 0?`670rpx`:`0rpx`}" style='margin-bottom: 10px;' >
			
			<scroll-view 
			  ref="scroll"
			  class="fill-pink nav text-center"
			  show-scrollbar="false"
			  :scroll-left="scrollTop"
			  @scrolltolower="scrolltolower"
			  lower-threshold="50"
			  scroll-x="true" 
			  style="white-space: nowrap;">
				<view @tap='goUserDetail(item.id)' class="avatar" v-for="(item, index2) in user_list" :key="index2">
					<image class="avatar-image" :src="item.avatar"></image>
				</view>
			</scroll-view>
			
			<view style="margin-left:50rpx;display: flex;">
				<view @click="tominipro" style="width: 155rpx;font-size: 24rpx;">
				  <image src="../static/main/01.png" style="width:85rpx;height: 85rpx;margin-left: 10rpx;"></image>伴伴生活  
				</view> 
				<view @click="tominipro" style="width: 155rpx;font-size: 24rpx;">
				  <image src="../static/main/02.png" style="width:85rpx;height: 85rpx;margin-left: 10rpx;"></image>伴伴一生  
				</view> 
				
				<view @click="tominipro" style="width: 155rpx;font-size: 24rpx;">
				  <image src="../static/main/03.png" style="width:85rpx;height: 85rpx;margin-left: 10rpx;"></image>伴伴到家  
				</view> 
				
				<view @click="tominipro" style="width: 155rpx;font-size: 24rpx;">
				  <image src="../static/main/04.png" style="width:85rpx;height: 85rpx;margin-left: 10rpx;"></image>伴伴成长  
				</view> 
				
				<view @click="toJumpStore" style="width: 155rpx;font-size: 24rpx;">
				  <image src="../static/main/05.png" style="width:85rpx;height: 85rpx;margin-left: 10rpx;"></image>联盟运营  
				</view> 
				 
			</view>
			<scrollX :list="classList" :nums="5" :col="1" />
			<!--
			<view class="total-box fill-base flex-x-center c-black ml-md mr-md radius abs" style="width: 95%; ">
				<view style="width: 100%;" v-for="(item, code) in totalList" :width="100/totalList.length + '%'">
					<view class="flex flex-x-center">{{ item.number }}</view>
					<view class="flex-warp flex-x-center">{{ item.name }}</view>
				</view>
			</view>-->
			
			<!-- <view class="data-box flex-center ml-md mr-md radius abs" style="width: 95%;">
				<view style="width: 100%;" v-for="(child, index) in typeList" :width="100/typeList.length + '%'" height="84rpx">
					<view @tap.stop='handerTypeChange(index)' class="flex-warp flex-x-center"  :class="[{'data-box-btn': typeChangeindex == index}]">{{ child }}</view>
				</view>
			</view> -->
			
			<view style="padding: 13rpx; display: flex;  justify-content: space-between;position: relative;top:-30rpx; ">
				<view class="hotsale" @click="gohotsale(1)"></view>
				<view class="jinv" @click="gohotsale(2)"></view>
			</view>
			
			<!-- <view class="search-box   ml-md mr-md radius-top-50"
				:class="[{'mt-md':banner.length ==0},{'':banner.length>0}]"     style="margin-top: 5px;">
				 <view class="flex-center" >
				 	<view style="width: 200%;">
				 		<tab @change="handerTabChange" :isLine="false" :list="tabList" :activeIndex="activeIndex*1"
				 			:activeColor="primaryColor" :width="100/tabList.length + '%'" height="84rpx"></tab>
				 	</view>
				 </view>
			</view> -->
		</view>
		
		<view v-if="typeChangeindex == 0" @tap.stop="goShopDetailPay(item.uid)"
			class="list-item flex-center mb-md ml-md mr-md pd-lg fill-base radius-16"
			v-for="(item, index) in list.data" :key="index">
			
			<image mode="aspectFill" class="cover radius-16" :src="item.thumb"></image>
			<view class="flex-1 ml-md" style="max-width: 450rpx;">
				<view class="flex-between">
					<view class="f-title c-title text-bold max-270 ellipsis">{{ item.name }}</view>
					
					<view class="flex-between" style="width: 250rpx;" @tap.stop="toNavigation(item)">
						<!-- <view class="f-title c-title image-bg" :style="{color: primaryColor}">豆</view> -->
						 <view></view>
						<view class="flex-center">
							<i class="iconfont iconjuli" :style="{color:primaryColor}"></i>
							<view class="f-desc c-title">{{item.distance || '未知'}}</view>
						</view>
					</view>
				</view>
				<view class="f-caption c-caption mt-sm mb-sm max-270 ellipsis" style="height: 36rpx;">{{ item.title || '' }}
				</view>
				<view class="flex-between mt-md">
					<!-- <view class="flex-y-center f-desc c-caption max-350 ellipsis">
						<view class="time-long flex-center">{{ item.time_long }}分钟</view>
						<view class="flex-y-baseline f-icontext c-warning ml-sm mr-sm">¥<view class="f-sm-title">
								{{ item.price }}
							</view>
						</view>
					</view> -->
					<view class="text-center max-350 ellipsis" :style="{color: primaryColor}">{{ item.address }}</view>
					<view class="item-btn flex-center f-caption c-base" :style="{ background: primaryColor }">
						查看详情
					</view>
				</view>
			</view>
		</view>
		
		<!-- <block v-if="typeChangeindex == 1" class="list-view">
			
			<view @tap.stop="goUserDetail(item.id)"
				class="list-item22 flex-y-end flex-x-end mb-md ml-md mr-md mb-md pd-lg fill-base radius-16" 
				:style="'background-image: url(' + item.avatar + ');margin:5px;'"
				v-for="(item, index) in list.data" :key="index">
				
				<view class="flex-1 mr-sm" style="width: 100%;">
					
					<view class="f-desc c-base ellipsis" style="margin: 5rpx 0;width: 100%;">{{ item.user_nicename }}</view>
					<view class="flex-warp flex-center fill-base radius log-tag" style="float: right;" @tap.stop="toNavigation(item)">
						<i class="iconfont iconjuli" :style="{color:primaryColor}"></i>
						<view class="f-desc c-title">{{item.distance}}</view>
					</view>
				</view>
			</view>
			
			<view :style="{height: `${configInfo.tabbarHeight}px`}"></view>
			
		</block> -->

		<!-- <view v-if="typeChangeindex == 1 || typeChangeindex == 2" class="list-item3 flex-center pd-lg mb-md ml-md mr-md fill-base radius-16 rel"
			v-for="(item,index) in list.data" :key="index">
			<view class="top-tag flex-center f-icontext abs" v-if="item.coach_type_status==1">优</view>
			<view class="flex-center flex-column"  @tap.stop="goDetail(index)">
				<view class="item-img rel">
					<image @tap.stop="toPreviewImage(index)" mode="aspectFill" lazy-load class="item-img radius"
						:src="item.work_img">
					</image>
				</view>
				<view class="item-tag flex-center f-icontext c-base radius-20"
					:class="[{'can-service':item.text_type==1}]">
					{{item.text_type == 1 ?'可服务': '服务中'}}
				</view>
			</view>
			<view class="flex-1 ml-md max-510">
				<view class="flex-between" @tap.stop="goDetail(index)">
					<view class="flex-y-center f-title c-title">
						<view class="text-bold max-200 ellipsis">{{item.coach_name}}</view>
						<view @tap.stop="toPreviewImage(index,1)" class="more-img flex-center ml-sm f-icontext"
							:style="{color:primaryColor,border:`1rpx solid ${primaryColor}`}">更多照片</view>
					</view>
				</view>
				<view class="flex-between mt-sm mb-md pb-md b-1px-b" @tap.stop="goDetail(index)">
					<view class="flex-y-center f-icontext">
						<view class="flex-y-center"><i class="iconfont iconyduixingxingshixin icon-font-color"></i>
							<view class="star-text">{{item.star}}</view>
						</view>
						<view class="order-num">
							已服务 {{item.order_num > 9999 ? '9999+' : item.order_num}}单</view>
					</view>
					
					<view class="flex-between" style="width: 250rpx;">
						<view class="f-title c-title image-bg happy_bean" :style="{color: primaryColor}">豆</view>
						<view class="flex-center" @tap.stop="toNavigation(item)">
							<i class="iconfont iconjuli" :style="{color:primaryColor}"></i>
							<view class="f-desc c-title">{{item.distance}}</view>
						</view>
					</view>
				</view>
				<view class="flex-between">
					<view class="flex-y-center f-desc c-caption">
						<view @tap.stop="goDetail(index,'message')" class="flex-y-center"><i
								class="iconfont iconpinglun mr-sm"></i>{{item.comment_num}} </view>
						<view @tap.stop="collectany(item.id,2)" class="flex-y-center ml-md"><i class="iconfont mr-sm"
								:class="[{'iconshoucang1':!item.is_collect},{'iconshoucang2':item.is_collect}]"
								:style="{color:item.is_collect ? primaryColor :''}"></i>{{item.collect_num}} </view>
						<view @tap.stop="goDetail(index)" class="flex-y-center ml-md">
							<i class="iconfont iconxiangqing mr-sm"></i>
							<view class="f-icontext">详情</view>
						</view>
						<view @tap.stop="goDetail(index)" class="flex-y-center ml-md">
							<view class="text-center" :style="{color: primaryColor}" >¥{{ item.service_price }}</view>
						</view>
					</view>
	
					<view @tap.stop="goDetail(index)" class="item-btn flex-center f-desc c-base"
						:style="{background: primaryColor}">立即预约
					</view>
				</view>
			</view>
		</view> -->
			
		<u-list v-if="typeChangeindex == 1" @scrolltolower="scrolltolower" :height="listHeight">
			<u-list-item class="list-item5 flex-column ml-md mr-md radius-16">
				<u-list-item class="setListItem" v-for="(item, index) in list.data" :key="index">
					<auth :needAuth="userInfo && !userInfo.mobile" :must="true"  @go="goGoodsDetail(index)"
						:type="!userInfo.phone ? 'phone' : 'userInfo'" style="width: 182rpx;">
					<view class="itemBox">
						<image mode="aspectFill" class="cover radius-16" :src="item.thumb"></image>
						<view class="flex-1 ml-md" style="max-width: 450rpx;">
							<view class="flex-between">
								<view class="f-title c-title text-bold max-270 ellipsis">{{ item.name }}</view>
							</view>
							<view class="flex-between mt-md">
								<view class="flex-y-center f-desc c-caption max-350 ellipsis">
									<view class="text-delete"   v-if="item.is_full==1">¥{{ item.original_price }}</view>
									<view class="flex-y-baseline f-sm-title c-warning ml-sm mr-sm"  v-if="item.is_full==1">
											¥{{ item.present_price }}
									</view>
									<view v-else class="flex-y-baseline f-sm-title c-warning ml-sm mr-sm" >¥{{ item.original_price }}</view>
								</view>
								<view class="flex-y-center f-caption c-caption max-350 ellipsis mr-sm" v-if="item.is_full==1">
									<view class="f-title c-title image-bg happy_bean" style="opacity: 0.6;" :style="{color: primaryColor}">豆</view>
								</view>
							</view>
							<view class="flex-between mt-sm">
								<view class="f-caption c-caption">已售{{ item.sale_nums }}件</view>
								<view class="flex-y-baseline f-sm-title c-warning ml-sm mr-sm" :style="{color: primaryColor}"  v-if="item.is_full==1">
										¥{{ item.original_price - item.present_price }}
								</view>
							</view>
						</view>
					</view>
					</auth>
				</u-list-item>
			</u-list-item>
		</u-list>
		
		<load-more :noMore="list.current_page >= list.last_page && list.data.length > 0" :loading="loading"
			v-if="loading">
		</load-more>
		<abnor v-if="!loading && list.data.length <= 0 && list.current_page == 1"></abnor>
		
		<view class="space-footer"></view>
		<!-- <view class="msgnoread" v-if="noreadnum>0">{{noreadnum}}</view> -->
	
		<uni-popup ref="coupon_item" type="center" :maskClick="false">
			<view class="coupon-popup f_r_c_c">
				<image class="bg-img" src="https://lbqnyv2.migugu.com/bianzu3.png" mode=""></image>
				<i @tap.stop="$refs.coupon_item.close()" class="iconfont icon-close c-base"></i>
				</image>
				<view class="coupon-info f_c_m_c">
					<view class="tops f_c_m_c">
						<view class="">
							成功领取
						</view>
						<view class="">
							卡券将放入“我的-我的卡券”
						</view>
					</view>
					<view class="lists f_r_c_c">
						<scroll-view scroll-y style="width: 420rpx;height:100%;">
							<view class="list f_r_sb_c" v-for="(item, index) in couponList" :key="index">
								<image src="/static/coupon/coupon.png" mode="aspectFill"></image>
								<view class="f_r_sb_c">
									<view class="f_c_m_c">
										<view class="price">
											{{item.discount}}
										</view>
										<view class="price_text">
											{{item.full*1>0?`满${item.full}可用`:`立减`}}
										</view>
									</view>
									<view class="title f_r_m_c">
										<view class="ellipsis-3">
											{{item.title}}
										</view>
									</view>
								</view>
							</view>
						</scroll-view>
					</view>
				</view>
				<view class="btns f_r_c_c" @tap.stop="userGetCoupon">
					<view class="f_r_c_c">
						领取到卡包
					</view>
				</view>
			</view>
		</uni-popup>
		<view class="overlay"  v-show="isshowPopup" @click="isshowPopup=false"> .</view>
		<view class="popup-container" v-show="isshowPopup">
			<view class="popup-content"> 
			<image src="../static/daysign.png" style="width:100%;height:528rpx;"></image>
			<view style="position: relative;top:-300rpx;margin-left: 160rpx;color:orange;">记得签到噢</view>
			<view style="position: relative;top:-290rpx;margin-left: 160rpx;color:orange;" v-if="userInfo.consumption>0">收益 {{userInfo.balance_total}} 元</view>
			<view style="position: relative;top:-280rpx;margin-left: 160rpx;color:orange;">幸福豆 {{userInfo.hbean}} 元豆</view>
				 <button @click="mainsign()" style="background-color:orange;color:#fff;width:60%;position: relative;top:-250rpx;left:140rpx;font-size: 50rpx;;">签到</button>
				
			 </view> 
			 </view> 
		<view :style="{height: `${configInfo.tabbarHeight}px`}"></view>
		<tabbar :cur="0"></tabbar>
		 
	</view>
	
</template>

<script>
	import {
		mapState,
		mapActions,
		mapMutations
	} from "vuex"
	import tabbar from "@/components/tabbar.vue"
	import scrollX from "@/components/scroll-x/index.vue";
	import MyNav from "@/components/my-nav1.vue"
	import $api from '@/api/index.js'
	import uQRCode from '@/utils/uqrcode.js' //引入uqrcode.js
	export default {
		beforeMount() {
			let resdata = this.list.data
			if(resdata[0].is_sign == 1)
			{
				this.isshowPopup = false
			}
			
			this.classList = [
				{
					id: 14,
					name: "科技数码",
					image: "/static/main/06.png",
					path: "/service/pages/user-list-other?id=14",
				},
				{
					id: 7,
					name: "珠宝首饰",
					image: "/static/main/07.png",
					path: "/service/pages/user-list-other?id=7",
				},
				{
					id: 3,
					name: "生活日化",
					image: "/static/main/08.png",
					path: "/service/pages/user-list-other?id=3",
				},
				{
					id: 16,
					name: "鞋包配饰",
					image: "/static/main/09.png",
					path: "/service/pages/user-list-other?id=16",
				},
				{
					id: 11,
					name: "水果专区",
					image: "/static/main/10.png",
					path: "/service/pages/user-list-other?id=11",
				},
				{
					id: 10,
					name: "家政",
					image: "/static/main/11.png",
					path: "/service/pages/user-list-other?id=10",
				},
				{
					id: 17,
					name: "自媒体",
					image: "/static/main/12.png",
					path: "/service/pages/user-list-other?id=17",
				},
				{
					id: 15,
					name: "创业",
					image: "/static/main/13.png",
					path: "/service/pages/user-list-other?id=15",
				},
				{
					id: 287,
					name: "健身",
					image: "/static/main/14.png",
					path: "/service/pages/user-list-other?id=287",
				},
				{
					id: 253,
					name: "电影",
					image: "/static/main/15.png",
					path: "/service/pages/user-list-other?id=253",
				}
			]
			
		},
		components: {
			tabbar,
			scrollX,
			MyNav
		},
		data() {
			return {
				//总高度
				height: 0,
				//胶囊位置信息
				menuButtonRect: {},
				//状态栏的高度
				statusBarHeight: 0,
				//导航栏的高度 '爱我',
				navBarHeight: 0,
				searchwords:"",
				typeList: ['门店',  '乐购'],
				typeChangeindex: 1,
				tabList: [
					{
						title: '热度',
						sort: 'top desc',
						sign: 0,
						is_sign: 1,
					}, {
						title: '价格',
						sort: 'price',
						sign: 0,
						is_sign: 1,
					}, {
						title: '销量',
						sort: 'total_sale',
						sign: 0,
						is_sign: 1,
					}, {
						title: '好评',
						sort: 'star',
						sign: 0,
						is_sign: 1,
					},
				],
				couponList: [], //优惠券
				isLoad: false,
				isLoadBanner: false,
				options: {},
				loading: true,
				lockTap: false,
				search: '',
				showQrcode: false,
				class_list: [], // 分类
				dataStatistics: {}, // 统计数量
				scrollTop: 0,
				interval: null,
				noreadnum:0,
				showSignPopup:true,
				isshowPopup:true,
				classList: [
					// {
					// 	id: 6,
					// 	name: "伴伴生活",
					// 	image: "/static/main/01.png",
					// 	path: "/service/pages/user-list?id=6",
					// },
					// {
					// 	id: 2,
					// 	name: "伴伴一生",
					// 	image: "/static/main/02.png",
					// 	path: "/service/pages/user-list-other?id=2",
					// },
					// {
					// 	id: 273,
					// 	name: "活动",
					// 	image: "/static/main/03.png",
					// 	path: "/service/pages/user-list-other?id=273",
					// },
					// {
					// 	id: 252,
					// 	name: "伴伴教育",
					// 	image: "/static/main/04.png",
					// 	path: "/service/pages/user-list-other?id=252",
					// },
					// {
					// 	id: 1,
					// 	name: "商家联盟",
					// 	image: "/static/main/05.png",
					// 	path: "/service/pages/user-list-other?id=1",
					// },
					{
						id: 14,
						name: "科技数码",
						image: "/static/main/06.png",
						path: "/service/pages/user-list-other?id=14",
					},
					{
						id: 7,
						name: "珠宝首饰",
						image: "/static/main/07.png",
						path: "/service/pages/user-list-other?id=7",
					},
					{
						id: 3,
						name: "生活日化",
						image: "/static/main/08.png",
						path: "/service/pages/user-list-other?id=3",
					},
					{
						id: 16,
						name: "鞋包配饰",
						image: "/static/main/09.png",
						path: "/service/pages/user-list-other?id=16",
					},
					{
						id: 11,
						name: "水果专区",
						image: "/static/main/10.png",
						path: "/service/pages/user-list-other?id=11",
					},
					{
						id: 10,
						name: "家政",
						image: "/static/main/11.png",
						path: "/service/pages/user-list-other?id=10",
					},
					{
						id: 17,
						name: "自媒体",
						image: "/static/main/12.png",
						path: "/service/pages/user-list-other?id=17",
					},
					{
						id: 15,
						name: "创业",
						image: "/static/main/13.png",
						path: "/service/pages/user-list-other?id=15",
					},
					{
						id: 287,
						name: "健身",
						image: "/static/main/14.png",
						path: "/service/pages/user-list-other?id=287",
					},
					{
						id: 253,
						name: "电影",
						image: "/static/main/15.png",
						path: "/service/pages/user-list-other?id=253",
					},
					// {
					// 	id: 284,
					// 	name: "汽车",
					// 	image: "/static/main/16.png",
					// 	path: "/service/pages/user-list-other?id=284",
					// },
					// {
					// 	id: 58,
					// 	name: "科技",
					// 	image: "/static/main/17.png",
					// 	path: "/service/pages/user-list-other?id=58",
					// },
					// {
					// 	id: 13,
					// 	name: "旅游",
					// 	image: "/static/main/18.png",
					// 	path: "/service/pages/user-list-other?id=13",
					// },
					// {
					// 	id: 286,
					// 	name: "首饰",
					// 	image: "/static/main/19.png",
					// 	path: "/service/pages/user-list-other?id=286",
					// },
					// {
					// 	id: 5,
					// 	name: "酒店",
					// 	image: "/static/main/21.png",
					// 	path: "/service/pages/user-list-other?id=5",
					// },
					// {
					// 	id: 289,
					// 	name: "减肥",
					// 	image: "/static/main/20.png",
					// 	path: "/service/pages/user-list-other?id=289",
					// },
					// {
					// 	id: 285,
					// 	name: "房产",
					// 	image: "/static/main/22.png",
					// 	path: "/service/pages/user-list-other?id=285",
					// },
					// {
					// 	id: 12,
					// 	name: "维修服务",
					// 	image: "/static/main/23.png",
					// 	path: "/service/pages/user-list-other?id=12",
					// },
					// {
					// 	id: 288,
					// 	name: "康复理疗",
					// 	image: "/static/main/24.png",
					// 	path: "/service/pages/user-list-other?id=288",
					// },
					// {
					// 	id: 18,
					// 	name: "其它",
					// 	image: "/static/main/25.png",
					// 	path: "/service/pages/user-list-other?id=18",
					// },
				]
				
			}
		},
		computed: mapState({
			pageActive: state => state.service.pageActive,
			activeIndex: state => state.service.activeIndex,
			param: state => state.service.param,
			list: state => state.service.list,
			banner: state => state.service.banner,
			user_list: state => state.service.user_list,
			// noreadnum: state => state.service.noreadnum,
			detail: state => state.service.detail,
			totalList: state => state.service.totalList,
			primaryColor: state => state.config.configInfo.primaryColor,
			subColor: state => state.config.configInfo.subColor,
			configInfo: state => state.config.configInfo,
			autograph: state => state.user.autograph,
			userInfo: state => state.user.userInfo,
		}),
		
		async onLoad(options) {
			this.$util.showLoading()
		
		//定位
			uni.getLocation({
				type:'wgs84',
				success:function(res){
					let param = {
						lng:res.longitude,
						lat:res.latitude,
					}
					if(typeof res.city !== 'undefined'){
						param.province = res.province
						param.city = res.city
					}
					console.log('param============')
					console.log(param)
					res = $api.user.userUpdate(param)
					console.log(res)
				}
			});
			
			this.getList(1)
			options = await this.updateCommonOptions(options)
			this.options = options
			// this.noreadnum = uni.getStorageSync('noreadnum')
			await this.initIndex(true)
			if (this.pageActive) {
				this.$util.setNavigationBarColor({
					bg: this.primaryColor
				})
				this.isLoad = true
				this.loading = false
				this.$util.hideAll()
				return
			}
			
			
			// this.updateServiceItem({
			// 	key: 'pageActive',
			// 	val: true
			// })
		
		},
	
		onPullDownRefresh() {
			this.initRefresh();
			uni.stopPullDownRefresh()
		},
		onReachBottom() {
			if (this.list.current_page >= this.list.last_page || this.loading) return;
			this.loading = true;
			this.getList(this.param.page + 1);
		},
		methods: {
			...mapActions(['getConfigInfo', 'getUserInfo', 'updateCommonOptions', 
			'getServiceIndex', 'getServiceList', 'getUserList', 'getTeacherList', 'getShopList', 'getFreeList']),
			...mapMutations(['updateServiceItem']),
			 
			getHeight(){
			  if (wx.canIUse('getMenuButtonBoundingClientRect')) {
			    let sysInfo = wx.getSystemInfoSync(); //状态栏的高度
			    this.statusBarHeight = sysInfo.statusBarHeight;
			    // 胶囊位置信息
			    let rect = wx.getMenuButtonBoundingClientRect();
			    this.menuButtonRect = JSON.parse(JSON.stringify(rect));
			    // 导航栏高度
			    let navBarHeight = (rect.top-sysInfo.statusBarHeight)*2+rect.height;
			    this.navBarHeight = navBarHeight;
			    // 自定义导航栏的高度
			    this.height = sysInfo.statusBarHeight + navBarHeight;
			  } else {
			    wx.showToast({
			      title: '您的微信版本过低，界面可能会显示不正常',
			      icon: 'none',
			      duration: 4000
			    });
			  }
			},
			async initIndex(refresh = false) {
				
				let classList = await this.$api.service.classList({
					class_id: 0
				});
				this.classList = classList
				this.getHeight();
				if (!this.configInfo.id || refresh) {
					await this.getConfigInfo()
				}
				
				let param = {
					lat: 1,
					lng: ''
				}
				param.lat = this.userInfo.lat
				param.lng = this.userInfo.lng
				await this.getServiceIndex(param)
				this.isLoad = true
				this.isLoadBanner = true
				// debugger
				this.loading = false
				this.$util.hideAll()
				
				// await Promise.all([this.getList(1), this.getCouponList()])
				this.$util.setNavigationBarColor({
					bg: this.primaryColor
				})
			},
			initRefresh() {
				this.isLoadBanner = false
				this.initIndex(true)
			},
			
			async userGetCoupon() {
				console.error("=====userGetCoupon")
				let ids = []
				this.couponList.forEach(v => {
					ids.push(v.id)
				})
				let res = await this.$api.service.userGetCoupon({
					coupon_id: ids
				})
				this.$util.showToast({
					title: `领取成功`
				})
				setTimeout(() => {
					this.$util.goUrl({
						url: '/user/pages/coupon/list'
					})
				}, 1000)
				this.$refs.coupon_item.close()
				this.loading = false
				this.$util.hideAll()
			},
			async getCouponList() {
				// let list = await this.$api.service.couponList()
				// this.couponList = list
				// if (list.length > 0 && this.isLoad) {
				// 	this.$refs.coupon_item.open()
				// }
				// this.loading = false
				// this.$util.hideAll()
			},
			toJumpStore() { // 联盟店
				this.$util.goUrl({
					url: "/service/pages/user-list-other?index=7",
				})
			},
			async getList(page = 0) {
				if (page) {
					let param = this.$util.deepCopy(this.param)
					param.page = page
					this.updateServiceItem({
						key: 'param',
						val: param
					})
				}
				let {
					list: oldList,
					param,
					tabList,
					activeIndex
				} = this
				let {
					sort,
					sign
				} = tabList[activeIndex]
				let desc = activeIndex == 0 || sign == 1 ? '' : 'desc'
				param.sort = `${sort} ${desc}`
				param.words = this.searchwords
				// if(this.typeChangeindex == 0){
				// 	param.lat = this.userInfo.lat
				// 	param.lng = this.userInfo.lng
				// 	await this.getShopList(param)
				// } else if(this.typeChangeindex == 1){
				// 	// 1爱我，2我爱
				// 	param.type = 1
				// 	await this.getUserList(param)
				// } else if(this.typeChangeindex == 1){
				// 	// 3老师
				// 	param.type = 3
				// 	await this.getServiceList(param)
				// } else if(this.typeChangeindex == 2){
				// 	await this.getTeacherList(param)
				// 	param.type = 3
				// } else if(this.typeChangeindex == 1){
					 await this.getFreeList(param)
				// }
				let resdata = this.list.data
				if(resdata[0].is_sign == 1)
				{
					this.isshowPopup = false
				}
				this.loading = false
				this.$util.hideAll()
				
				this.startMessageTimer()
			},
			handerTabChange(index) {
				this.updateServiceItem({
					key: 'activeIndex',
					val: index
				})
				let tabList = this.$util.deepCopy(this.tabList)
				let {
					is_sign,
					sign,
				} = tabList[index];
				if (is_sign) {
					tabList[index].sign = sign == 0 ? 1 : 0;
				}
				this.updateServiceItem({
					key: 'tabList',
					val: tabList
				})
				this.$util.showLoading()
				uni.pageScrollTo({
					scrollTop: 0
				})
				this.getList(1)
			},
			// 详情
			goDetail(index) {
				let {
					id
				} = this.list.data[index]
				// id = 140
				let url = `/user/pages/detail?id=${id}`
				this.$util.goUrl({
					url
				})
			},
			gohotsale(type)
			{
				this.$util.goUrl({
					url:'/service/pages/hotgoods?t='+type
				})
			},
			// 商品购买详情
			goGoodsDetail(index) {
				let {
					id
				} = this.list.data[index]
				let url = `/user/pages/shop/goods-detail-pay?id=${id}`
				this.$util.goUrl({
					url
				})
			},
			// 用户详情
			goUserDetail(id) {
				uni.showToast({
					title:'功能开发中'
				})
				return
				let url = `/user/pages/user-detail?id=${id}&from=ser`
				this.$util.goUrl({
					url
				})
			},
			goclassdetail(id)
			{
				let url = `/service/pages/user-list-other?id=${id}`
				this.$util.goUrl({
					url
				})
			},
			toPreviewImage(index, key = 0) {
				debugger
				let {
					work_img,
					self_img
				} = this.list.data[index]
				let urls = [work_img]
				if (key) {
					urls = self_img
				}
				this.$util.previewImage({
					current: urls,
					urls
				})
			},
			toSearch() {
				console.log(this.searchwords)
				this.getList(1)
				// let url = '/service/pages/search-list'
				// this.$util.goUrl({
				// 	url
				// })
			},
			toDownload() {
				let url = '/service/pages/download'
				this.$util.goUrl({
					url
				})
			},
			async toQrcode() {
				// 允许从相机和相册扫码
				uni.scanCode({
					success: async (res) => {
					  this.result = res.result
					  var p_arr = this.result.split("&")
					  var param = {}
					  for (let key in p_arr) {
						let uid_arr = p_arr[key].split("=")
					  	param[uid_arr[0]] = uid_arr[1]
					  }
					  let result = await $api.user.turnHappyBean(param)
					  if(result){
						  uni.showToast({
							title: '成功转出'+param.number,
							icon: 'success',
							duration:5000
						})
					  }else{
						  uni.showToast({
						  	title: '转出失败',
						  	icon: 'error',
						  	duration:5000
						  })
					  }
					  
					},
					fail: (res) => {
					  uni.showToast({
						title: '扫描失败',
						icon: 'error',
						duration:5000
					  })
					}
				})
			},
			startMessageTimer() {
				clearInterval(this.interval); 
				let divData = this.$refs.scroll;
				this.interval = setInterval(() => {
				  this.scrollTop += 10;
			    }, 500);
			},
			 onSearch(e)
			 {
				 let url = '/service/pages/search-list?words='+e.detail.value
				 				this.$util.goUrl({
				 					url
				 				})
				 // console.log('搜索内容:', e.detail.value); 
			 },
			scrolltolower() {
				this.scrollTop = 0;
			},
			handerTypeChange(index) {
				this.typeChangeindex = index
				if(this.typeChangeindex == 0 || this.typeChangeindex == 3 || this.typeChangeindex == 4){
					this.setTabList(0)
				} else {
					this.setTabList(1)
				}
				this.getList(1)
			},
			async signIn(){
				let data = await this.$api.user.getSign();
				if(data){
					this.$util.showToast({
						title: `签到成功`
					})	
					this.showSignPopup = false;
					uni.setStorageSync('is_signtoday',1);
				}
				
			},
			setTabList(type){
				if(type == 0){
					this.tabList = [
						{
							title: '热度',
							sort: 'top desc',
							sign: 0,
							is_sign: 1,
						}, {
							title: '价格',
							sort: 'price',
							sign: 0,
							is_sign: 1,
						}, {
							title: '销量',
							sort: 'total_sale',
							sign: 0,
							is_sign: 1,
						}, {
							title: '好评',
							sort: 'star',
							sign: 0,
							is_sign: 1,
						},
					]
				} else {
					this.tabList = [
						{
							title: '热度',
							sort: 'top desc',
							sign: 0,
							is_sign: 1,
						}, {
							title: '好评',
							sort: 'star',
							sign: 0,
							is_sign: 1,
						},
					]
				}
			},
			// 店铺购买详情
			goShopDetailPay(id) {
				let url = `/user/pages/shop/shop-detail-pay?id=${id}`
				this.$util.goUrl({
					url
				})
			},
			tominipro(){
				uni.navigateToMiniProgram({
					appId:'wx3867370eee8df50c',
					path:'pages/service',
					success() {
						console.log('跳转成功');
					}
				})
			},
			scroll: function(e) {
							console.log(e)
							this.old.scrollTop = e.detail.scrollTop
						},
			//导航--传终点的坐标即可
			toNavigation(item) {
				//根据终点地址调起地图导航
				uni.openLocation({
					longitude: parseFloat(item.lng),// 经度，范围为-180~180，负数表示西经
					latitude: parseFloat(item.lat),// 纬度，范围为-90~90，负数表示南纬
					scale: 28, // 缩放比例
					name:item.name,//终点名称
					address:item.address,//终点详细地址
					success: function (res) {
						console.log('success:',res);
					}
				});
			},
			//收藏商品或服务
			async collectany(uid,type){
				let param = {
					cid: uid,
					type:type
				}
				let data = await $api.user.collectanything(param)
				
			},
			async mainsign()
			{
				let signdata = await this.$api.user.getSign();
				if(signdata){
					uni.showToast({
						title:signdata,
						duration:4000,
						icon:"none"
					})
					this.isshowPopup = false;
					}
					// this.initRefresh();
			
			}
		}
	}
</script>

<style lang="scss">
	.pages-home {
		.top-bg{
		    position: fixed;
		    width: 100%;
			height: 100%;
		    top: 0rpx;
		    left: 0;
		    z-index: -1;
		}
		
		.bg-image {
		    position: absolute;
		    width: 100%;
		    height: 250rpx;
		    z-index: -1;
		}
		

		.top {
			height: 70rpx;
			overflow: hidden;
			padding-top: 5rpx;
			padding-bottom: 5rpx;
			display: flex;
			
			.search {
				height: 60rpx;
				width: 350rpx;
				padding-left: 0rpx;
				margin-left: 20rpx;
				overflow: hidden;
				// background-color: #fff;
				border-radius: 5rpx;
				float: left;
			}
			.item-btn {
				width: 150rpx;
				height: 60rpx;
				border-radius: 30rpx;
				margin-right: 30rpx;
				float: left;
				background-color: #e7c6c6;
				color: #000;
				display: flex;
				align-items: center; // 纵轴对齐方式，默认是纵轴 子元素垂直居中
				justify-content: center; //横轴对齐方式，默认是纵轴
			}
			.image {
				width: 60rpx;
				height: 60rpx;
				margin-right: 30rpx;
				float: left;
				display: flex;
			}
		}
		.total-box {
			width: 100%;
			height: 75rpx;
			overflow: hidden;
			float: left;
			display: flex;
			background-position: center;
			background-size:cover;
			background-repeat: no-repeat;
			background-image: url("/static/main/total_bg.png");
		}
		.data-box {
			width: 100%;
			height: 84rpx;
			overflow: hidden;
			float: left;
			display: flex;
			background-position: center;
			background-size:cover;
			background-repeat: no-repeat;
			background-image: url("/static/main/tab_bg.png");
			.data-box-btn {
				margin: 0;
				padding: 0;
				height: 64rpx;
				display: flex;
				align-items: center;
				border-radius: 25px;
				background-position: center;
				background-size:cover;
				background-repeat: no-repeat;
				background-image: url("/static/main/btn_bg.png");
				// background-color: #b08db7;
				// border-radius: 50rpx;
				// line-height: 1.5;
				// border-color: #000;
				// border-width: 2rpx;
				text-align: left;
				color: #333;
			}
		}
		
		.search-box {
			width: 710rpx;
			bottom: 0;
			z-index: 9;
			overflow: hidden;
			margin-top: 90rpx;
		}

		.list-item {
			background-color: #ffffff;
			.cover {
				width: 180rpx;
				height: 180rpx;
			}
			
			.text {
				width: 75rpx;
				height: 75rpx;
			}
			
			.image-bg {
				width: 55rpx;
				height: 55rpx;
				font-weight: 600;
				padding-top: 0rpx;
				text-align: center;
				background-position: center;
				background-size:cover;
				background-repeat: no-repeat;
				background-image: url("/static/common/avoid.png");
				opacity: 0.6;
			}

			.time-long {
				min-width: 72rpx;
				height: 30rpx;
				padding: 0 5rpx;
				background: linear-gradient(270deg, #4C545A 0%, #282B34 100%);
				border-radius: 4rpx;
				font-size: 20rpx;
				color: #FFEEB9;
				margin-right: 16rpx;
			}

			.f-icontext {
				font-size: 18rpx;
			}

			.text-delete {
				font-size: 20rpx;
				color: #B9B9B9;
			}

			.item-btn {
				width: 130rpx;
				height: 52rpx;
				border-radius: 8rpx;
			}
		}
		
		.list-view {
			margin-bottom: 160rpx;
			padding-bottom: 160rpx;
		}
		
		.glodYBox{
			display: flex;
			flex-direction: row;
			flex-wrap: wrap;
			justify-content: space-between;
			.setListItem{
				flex: 0;
				.itemBox {
					width: 330rpx;
					min-width: 330rpx;
					height: 400rpx;
					overflow: hidden;
					margin: 10rpx 10rpx;
					
					.bg-img{
					    position: fixed;
					    width: 100%;
					    height: 100%;
					    top: 0;
					    left: 0;
					    z-index: -1;
					}
					
					.itemImg {
						width: 330rpx;
						height: 400rpx;
						border-radius: 10rpx;
					}
				
					.introduce {
						font-size: 28rpx;
					}
				
					.guanFang {
						display: flex;
						flex-direction: row;
						justify-content: flex-start;
						align-items: center;
				
						.guanText {
							font-size: 18rpx;
							color: #555;
							margin-right: 10rpx;
						}
						.time {
							font-size: 18rpx;
							color: #ccc;
							text-decoration: line-through;
						}
					}
				}	
			}
		}
		
		.list-item22 {
			float: left;
			box-sizing: border-box;
			width: 45%;
			height: 400rpx;
			padding: 10px 6px;
			background-position: center;
			background-size:cover;
			background-repeat: no-repeat;
			
			.member-tag {
				width: 168rpx;
				height: 46rpx;
				background: #0e0f0f;
			
				.iconfont {
					font-size: 28rpx;
				}
			}
			
			.log-tag {
				width: 168rpx;
				height: 46rpx;
				background: #fff;
			
			}
			
			.cover {
				width: 180rpx;
				height: 180rpx;
			}
			
			.text {
				width: 75rpx;
				height: 75rpx;
			}
			
			.image-bg {
				width: 55rpx;
				height: 55rpx;
				font-weight: 600;
				padding-top: 0rpx;
				text-align: center;
				background-position: center;
				background-size:cover;
				background-repeat: no-repeat;
				background-image: url("/static/common/avoid.png");
				opacity: 0.6;
			}
		
			.time-long {
				min-width: 72rpx;
				height: 30rpx;
				padding: 0 5rpx;
				background: linear-gradient(270deg, #4C545A 0%, #282B34 100%);
				border-radius: 4rpx;
				font-size: 20rpx;
				color: #FFEEB9;
				margin-right: 16rpx;
			}
		
			.f-icontext {
				font-size: 18rpx;
			}
		
			.text-delete {
				font-size: 20rpx;
				color: #B9B9B9;
			}
		
			.item-btn {
				width: 130rpx;
				height: 52rpx;
				border-radius: 8rpx;
			}
		}
		
		.list-item3 {
			.top-tag {
				width: 40rpx;
				height: 30rpx;
				color: #B75E1D;
				background: linear-gradient(90deg, #DFB885 0%, #FCE0AD 100%);
				border-radius: 8rpx 0 8rpx 0;
				top: 0;
				left: 0;
			}
		
			.item-img {
				width: 124rpx;
				height: 124rpx;
			}
		
			.image-bg {
				width: 55rpx;
				height: 55rpx;
				font-weight: 600;
				padding-top: 0rpx;
				text-align: center;
				background-position: center;
				background-size:cover;
				background-repeat: no-repeat;
				background-image: url("/static/common/avoid.png");
				opacity: 0.6;
			}
		
			.top-img {
				width: 146rpx;
				height: 140rpx;
				top: -7rpx;
				left: -11rpx;
			}
		
			.hot-img {
				width: 75rpx;
				height: 51rpx;
				top: 77rpx;
				left: 25rpx;
			}
		
			.new-img {
				width: 38rpx;
				height: 52rpx;
				top: 83rpx;
				left: 78rpx;
			}
		
			.item-tag {
				width: 100rpx;
				height: 32rpx;
				color: #000;
				background: rgba(216, 216, 216, 0.3);
				margin-top: 19rpx;
				margin-bottom: 6rpx;
			}
		
			.item-tag.can-service {
				color: #EBDDB1;
				background: linear-gradient(270deg, #4C545A 0%, #282B34 100%);
			}
		
			.more-img {
				width: 104rpx;
				height: 33rpx;
				border-radius: 3px;
				transform: rotateZ(360deg);
			}
		
			.can-service-btn {
				width: 64rpx;
				height: 28rpx;
				margin-left: 8rpx;
		
				.bg {
					width: 64rpx;
					height: 28rpx;
					opacity: 0.1;
					border-radius: 3rpx;
					top: 0;
					left: 0;
					z-index: 1;
				}
		
				.text {
					width: 64rpx;
					height: 28rpx;
					top: 0;
					left: 0;
					z-index: 2
				}
			}
		
			.iconyduixingxingshixin {
				font-size: 28rpx;
				background-image: -webkit-linear-gradient(270deg, #FAD961 0%, #F76B1C 100%);
			}
		
			.star-text {
				color: #FF9519;
				margin-left: 6rpx;
			}
		
			.order-num {
				color: #4D4D4D;
				margin-left: 16rpx;
			}
		
			.item-btn {
				width: 130rpx;
				height: 52rpx;
				border-radius: 8rpx;
			}
		}
		
		.list-item2{
			display: flex;
			flex-direction: row;
			flex-wrap: wrap;
			flex-shrink: 1;
			justify-content: space-between;
			background-position: center;
			background-size:cover;
			background-repeat: no-repeat;
			.setListItem{
				flex: 0;
				.itemBox {
					width: 330rpx;
					min-width: 330rpx;
					overflow: hidden;
					margin: 10rpx 0;
					height: 400rpx;
					
					.itemImg {
						width: 330rpx;
						height: 400rpx;
						border-radius: 10rpx;
					}
					
					.member-tag {
						width: 168rpx;
						height: 46rpx;
						background: #0e0f0f;
					
						.iconfont {
							font-size: 28rpx;
						}
					}
					
					.log-tag {
						width: 168rpx;
						height: 46rpx;
						background: #fff;
					
					}
					
					.cover {
						width: 180rpx;
						height: 180rpx;
					}
					
					.text {
						width: 75rpx;
						height: 75rpx;
					}
					
					.image-bg {
						width: 55rpx;
						height: 55rpx;
						font-weight: 600;
						padding-top: 0rpx;
						text-align: center;
						background-position: center;
						background-size:cover;
						background-repeat: no-repeat;
						background-image: url("/static/common/avoid.png");
						opacity: 0.6;
					}
				
					.time-long {
						min-width: 72rpx;
						height: 30rpx;
						padding: 0 5rpx;
						background: linear-gradient(270deg, #4C545A 0%, #282B34 100%);
						border-radius: 4rpx;
						font-size: 20rpx;
						color: #FFEEB9;
						margin-right: 16rpx;
					}
				
					.f-icontext {
						font-size: 18rpx;
					}
				
					.text-delete {
						font-size: 20rpx;
						color: #B9B9B9;
					}
				
					.item-btn {
						width: 130rpx;
						height: 52rpx;
						border-radius: 8rpx;
					}
				}	
			}
		}
		
		.list-item5{
			display: flex;
			flex-direction: row;
			flex-wrap: wrap;
			justify-content: space-between;
			.setListItem{
				flex: 0;
				// background-color: #23B475;
				border-radius: 18rpx;
				.itemBox {
					width: 345rpx;
					min-width: 340rpx;
					height: 500rpx;
					overflow: hidden;
					margin: 6rpx 6rpx;
					border:3rpx solid mediumvioletred;
					border-radius: 18rpx;
					box-shadow:8rpx 8rpx 12rpx 2rpx lightgrey;
					.log-tag {
						width: 168rpx;
						height: 46rpx;
						background: #fff;
					}
					
					.cover {
						width: 100%;
						height: 300rpx;
					}
					
					.text {
						width: 75rpx;
						height: 75rpx;
					}
					
					.image-bg {
						width: 55rpx;
						height: 55rpx;
						font-weight: 600;
						padding-top: 0rpx;
						text-align: center;
						background-position: center;
						background-size:cover;
						background-repeat: no-repeat;
						background-image: url("/static/common/avoid.png");
						opacity: 0.6;
					}
							
					.time-long {
						min-width: 72rpx;
						height: 30rpx;
						padding: 0 5rpx;
						background: linear-gradient(270deg, #4C545A 0%, #282B34 100%);
						border-radius: 4rpx;
						font-size: 20rpx;
						color: #FFEEB9;
						margin-right: 16rpx;
					}
							
					.f-icontext {
						font-size: 18rpx;
					}
							
					.text-delete {
						font-size: 20rpx;
						color: #B9B9B9;
					}
							
					.item-btn {
						width: 130rpx;
						height: 52rpx;
						border-radius: 8rpx;
					}
				}	
			}
		}
		
		.avatar-image {
			width: 85rpx;
			height: 85rpx;
			margin-right: 0rpx;
			float: left;
			display: flex;
			border-radius: 50rpx;
		}
	}
	
	.qrcode-popup {
		width: 500rpx;
		height: 680rpx;
		position: relative;
		.icon-close {
			font-size: 60rpx;
			position: absolute;
			top: 30rpx;
			right: 30rpx;
			z-index: 999;
		}
	}

	.coupon-popup {
		width: 658rpx;
		height: 865rpx;
		position: relative;

		.bg-img {
			width: 100%;
			height: 100%;
		}

		.icon-close {
			font-size: 60rpx;
			position: absolute;
			top: 50rpx;
			right: 60rpx;
			z-index: 999;
		}

		.coupon-info {
			position: absolute;
			width: 100%;
			height: 100%;
			bottom: 0;
			left: 0;

			.tops {
				width: 480rpx;
				color: #FB4523;
				position: absolute;
				top: 260rpx;

				>view:nth-child(1) {
					font-weight: bold;
					font-size: 30rpx;
				}
			}

			.lists {
				width: 500rpx;
				height: 300rpx;
				padding: 10rpx;
				overflow-x: hidden;
				position: absolute;
				bottom: 222rpx;

				.list {
					width: 420rpx;
					height: 130rpx;
					margin-bottom: 10rpx;
					margin-top: 5rpx;
					position: relative;

					>image {
						width: 100%;
						height: 100%;
					}

					>view {
						position: absolute;
						width: 100%;
						height: 100%;
						top: 0;
						left: 8rpx;

						>view:nth-child(1) {
							width: 38%;
						}

						>view:nth-child(2) {
							display: flex;
							justify-content: center;
							flex: 1;
							padding: 0 15rpx;
							box-sizing: border-box;
						}

						.price {
							font-size: 30rpx;
							color: #FB4523;
						}

						.title {
							font-size: 30rpx;
							line-height: 36rpx;
							font-weight: bold;
						}

						.price_text {
							color: #ccc;
						}
					}
				}
			}

		}

		view.btns {
			width: 100%;
			position: absolute;
			height: 82rpx;
			bottom: 18rpx;
			left: 0;

			>view {
				width: 422rpx;
				height: 82rpx;

				border-radius: 40rpx;
				font-size: 34rpx;
				color: #FFFFFF;
			}
		}
		.searchbox{
			display: flex;
			justify-content: space-between;
		
			height:30px;
			padding: 20px;
			border-radius: 30px;
			    background-color: white;
		}
		
	}
	.msgnoread{
		background-color: red;
		color: #fff;
		padding: 2px;
		padding-left: 4px;
		border-radius: 25px;
		width:15px;
		height: 18px;
		position: fixed;
		bottom: 26px;
		right:23%;
		z-index: 9999;
	}
	.sign-popup {  
	  padding: 20px;  
	  background-color: #FFFFFF;  
	  /* 其他样式 */  
	}  
	  
	.sign-image {  
	  width: 100%;  
	  height: auto;  
	  /* 其他样式 */  
	}  
	.container {  
	  display: flex;  
	      justify-content: center;  
	      align-items: center;  
	      height: 100rpx;
		  background-color: #fff;
	}  
	.hotsale{
		background-image: url("http://qny.bbi-love.com/icons/rexiao.png");
		border-radius: 15px;
		padding: 60rpx 60rpx;
		margin: 20rpx;
		font-size: 50rpx;
		font-weight: bold;
		width:45%;
		height: 110px;
		background-position: center;
		background-size: cover;
	}
	.jinv{
		background-image: url("http://qny.bbi-love.com/icons/jinv.png");
		border-radius: 15px;
		padding: 60rpx 60rpx;
		margin: 20rpx;
		font-size: 50rpx;
		font-weight: bold;
		width:45%;
		height: 110px;
		background-position: center;
		background-size: cover;
	}
	.overlay {
	  position: fixed;  
	  top: 0;  
	  left: 0;  
	  right: 0;  
	  bottom: 0;  
	  background-color: rgba(0, 0, 0, 0.8); /* 半透明黑色 */  
	  z-index: 990; /* 确保层在最上面 */  
	}  
	.popup-container {  
	  position: fixed;  
	  bottom: 700rpx;  
	  width: 100%;  
	  height: 430rpx; /* 弹出框的高度，可以根据需要调整 */  
	  transition: transform 0.3s ease-out; /* 动画效果 */  
	   z-index: 999; /* 确保层在最上面 */ 
	} 
	  
	.popup-content {  
	  padding: 20px;  
	  
	} 
	 .tanchuang{
		 width:100%;
		 height:600rpx;
		 background-image: url("../static/daysign.png");
	 }
	  
	/* 当 showPopup 为 true 时，应用动画效果 */  
	.popup-container[v-show] {  
	  transform: translateY(-100%);  
	}  
		.scroll-view_H {
			white-space: nowrap;
			// width: 100%;
		}
		.scroll-view-item {
			height: 60rpx;
			line-height: 50rpx;
			text-align: center;
			font-size: 20rpx;
		}
		.scroll-view-item_H {
			display: inline-block;
			width: 130rpx;
			height: 60rpx;
			// background-color: #E7777F;
			// color:#fff;
			// margin:10rpx;
			border-radius: 5rpx;
			line-height: 50rpx;
			text-align: center;
			font-size: 30rpx;
			padding-top: 7rpx;;
		}

</style>
